package test08.ts01;

import java.util.stream.Stream;

/**
 * @Author czl
 * @Date 2024-04-15
 */
public class MainTest01 {
    public static void main(String[] args) {
        Integer [] arr = {1,2,7,4,3,6,5};

        Stream<Integer> stream = Stream.of(arr);

        Integer reduce = stream.reduce(0,Integer::sum);

        System.out.println(reduce);
    }
}
